function EFFECT:Init(data)
	self.hull = data:GetEntity()
	self.Alpha = 1
	if self.hull:IsValid() then
		self.Entity:SetPos(data:GetEntity():GetPos())
		self.Entity:SetAngles(data:GetEntity():GetAngles())
		self.Entity:SetParent(data:GetEntity())
		self.Entity:SetPos(data:GetOrigin())
		self.Entity:SetModel(data:GetEntity():GetModel())
		self.mat = Material("phoenix_storms/pack2/darkblue")
		//self.mat = Material(self.hull:GetNetworkedEntity("Shield"):GetNetworkedString("Material"))
		self.Entity:SetColor(255,255,255,1)
		self.ModelScale = 1.1
	
		local OBBMax, OBBMin = self.hull:OBBMaxs() * self.ModelScale, self.hull:OBBMins() * self.ModelScale
		self.Entity:SetRenderBounds(OBBMin, OBBMax)
	end
end

function EFFECT:Think()
	if self.hull:IsValid() and self.hull:GetNetworkedBool("IsShielded") then
		if self.Alpha < 70 then
			self.Alpha = self.Alpha + 1
			self.Entity:SetColor(255,255,255,self.Alpha)
		end
		if not (self.Entity:GetParent() != nil and self.Entity:GetParent():IsValid()) then
			self.Entity:SetPos(self.hull:GetPos())
			self.Entity:SetAngles(self.hull:GetAngles())
			self.Entity:SetParent(self.hull:GetParent())
		end
		return true
	else
		return false
	end
end 

function EFFECT:Render()
		SetMaterialOverride(self.mat)
		self.Entity:SetModelScale(Vector() * self.ModelScale)
		self.Entity:DrawModel()
		SetMaterialOverride(nil)
end
